﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UceciPodrobnosti.aspx.cs"
    Inherits="Sio.Mdm.Web.Uporabnik.UceciPodrobnosti" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Učenec</title>

    <script type="text/javascript">
        var drzavljanstvoRenderer = function(value) {
            var r = StoreDrzavljanstvo.getById(value);
            if (Ext.isEmpty(r)) { return ""; }
            return r.data.Naziv;
        };
        var obcineRenderer = function(value) {
            var r = StoreObcine.getById(value);
            if (Ext.isEmpty(r)) { return ""; }
            return r.data.Naziv;
        };
        var posteRenderer = function(value) {
            var r = StorePoste.getById(value);
            if (Ext.isEmpty(r)) { return ""; }
            return r.data.Naziv;
        };        
    </script>

</head>
<body>
    <form id="formUceciPodrobnosti" runat="server">
    <ext:ResourceManager ID="ResourceManager2" runat="server">
        <Listeners>
            <DocumentReady Handler="TabVlogaPodrobnosti.addTab(VlogaStatusGrid);" />
        </Listeners>
    </ext:ResourceManager>
    <ext:Store runat="server" ID="StoreObcine">
        <Reader>
            <ext:JsonReader IDProperty="ObcinaId">
                <Fields>
                    <ext:RecordField Name="ObcinaId" Type="Int" />
                    <ext:RecordField Name="Naziv" Type="String" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store runat="server" ID="StorePoste">
        <Reader>
            <ext:JsonReader IDProperty="PostaId">
                <Fields>
                    <ext:RecordField Name="PostaId" Type="Int" />
                    <ext:RecordField Name="PostnaStevilka" Type="Int" />
                    <ext:RecordField Name="Naziv" Type="String" />
                    <ext:RecordField Name="StevilkaNaziv" Type="String">
                        <Convert Handler="return record.PostnaStevilka+' '+record.Naziv;" />
                    </ext:RecordField>
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="StoreStars1" runat="server">
        <Reader>
            <ext:JsonReader IDProperty="StoreStars1">
                <Fields>
                    <ext:RecordField Name="VlogaId" Type="Int" />
                    <ext:RecordField Name="Telefon" Type="String" />
                    <ext:RecordField Name="TelefonSluzba" Type="String" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Viewport ID="Viewport1" runat="server" Layout="Border">
        <Items>
            <sio:ScrollingPanel ID="ScrollingPanel1" runat="server" Border="true" Region="center"
                Height="420" AnchorVertical="-10">
                <Items>
                    <ext:FormPanel ID="FormPanelPodrobnosti" runat="server" Padding="6" LabelAlign="Top"
                        Height="230">
                        <Items>
                            <ext:FieldSet ID="OFieldset3" runat="server" Title="Osebni podatki" Layout="form"
                                Width="625">
                                <Items>
                                    <ext:Panel ID="Panel3" runat="server" Width="600" Border="false">
                                        <Items>
                                            <ext:Container ID="Container1" runat="server" Layout="Column" Height="90">
                                                <Items>
                                                    <ext:Container ID="Container2" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".4">
                                                        <Items>
                                                            <ext:TextField ID="tfNaslov" DataIndex="Naslov" runat="server" FieldLabel="Naslov"
                                                                AllowBlank="false" MinLength="2" AnchorHorizontal="95%" />
                                                            <ext:Container ID="Container4" runat="server" Layout="Column" Height="100" AnchorHorizontal="98%">
                                                                <Items>
                                                                    <ext:Container ID="Container5" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth="1">
                                                                        <Items>
                                                                            <ext:TextField ID="tfEnaslov" DataIndex="email" runat="server" FieldLabel="E-naslov"
                                                                                AllowBlank="false" Vtype="email" MinLength="2" AnchorHorizontal="97%" />
                                                                        </Items>
                                                                    </ext:Container>
                                                                    <%--<ext:Container ID="Container6" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".5">
                                      <Items>                                                          
                                        <ext:NumberField ID="nfTelefon" DataIndex="telefon" runat="server" FieldLabel="Telefon" AllowBlank="false" MinLength="3"  MaxLength="10"  AnchorHorizontal="95%" Visible="false"/>    
                                      </Items>
                                    </ext:Container>--%>
                                                                </Items>
                                                            </ext:Container>
                                                        </Items>
                                                    </ext:Container>
                                                    <ext:Container ID="Container3" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".3">
                                                        <Items>
                                                            <ext:ComboBox ID="cbPoste" runat="server" StoreID="StorePoste" Editable="false" LabelAlign="Top"
                                                                FieldLabel="Pošta" DisplayField="StevilkaNaziv" ValueField="PostaId" TypeAhead="true"
                                                                AnchorHorizontal="95%" Mode="Local" ForceSelection="true" EmptyText="Izberi pošto..."
                                                                Resizable="false" SelectOnFocus="true" AutoHeight="true" />
                                                            <ext:TextField ID="tfDrzavljanstvo" DataIndex="drzavljanstvo" runat="server" FieldLabel="Državljanstvo"
                                                                AllowBlank="false" MinLength="2" AnchorHorizontal="95%" />
                                                        </Items>
                                                    </ext:Container>
                                                    <ext:Container ID="Container7" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".3">
                                                        <Items>
                                                            <ext:ComboBox ID="cbObcine" runat="server" StoreID="StoreObcine" Editable="false"
                                                                LabelAlign="Top" FieldLabel="Občina" DisplayField="Naziv" ValueField="ObcinaId"
                                                                TypeAhead="true" AnchorHorizontal="95%" Mode="Local" ForceSelection="true" EmptyText="Izberi občino..."
                                                                Resizable="false" SelectOnFocus="true" AutoHeight="true" />
                                                            <ext:Container ID="Container8" runat="server" Layout="Column" Height="100" AnchorHorizontal="100%">
                                                                <Items>
                                                                    <ext:Container ID="Container9" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".5">
                                                                        <Items>
                                                                            <ext:NumberField ID="nfEMSO" runat="server" DataIndex="emso" FieldLabel="EMŠO" AllowBlank="false"
                                                                                MinLength="13" MaxLength="13" AnchorHorizontal="95%" />
                                                                        </Items>
                                                                    </ext:Container>
                                                                    <ext:Container ID="Container10" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".5">
                                                                        <Items>
                                                                            <ext:NumberField ID="nfDavcna" DataIndex="davcna" runat="server" FieldLabel="Davčna"
                                                                                AllowBlank="false" MinLength="8" MaxLength="8" AnchorHorizontal="95%" />
                                                                        </Items>
                                                                    </ext:Container>
                                                                </Items>
                                                            </ext:Container>
                                                        </Items>
                                                    </ext:Container>
                                                </Items>
                                            </ext:Container>
                                        </Items>
                                    </ext:Panel>
                                </Items>
                            </ext:FieldSet>
                            <ext:Panel ID="Panel17" runat="server" Border="false" LabelAlign="Top" Width="653">
                                <Items>
                                    <ext:ColumnLayout ID="ColumnLayout2" runat="server" Split="true" FitHeight="false">
                                        <Columns>
                                            <ext:LayoutColumn ColumnWidth=".5">
                                                <ext:Panel ID="Panel9" runat="server" Border="false" Width="325">
                                                    <Items>
                                                        <ext:FieldSet ID="Fieldset1" runat="server" Title="Starš 1" Layout="form" Width="300">
                                                            <Items>
                                                                <ext:Panel ID="Panel1" runat="server" Width="300" Border="false" ButtonAlign="Center">
                                                                    <Items>
                                                                        <ext:Container ID="Container11" runat="server" Layout="Column" Height="45">
                                                                            <Items>
                                                                                <ext:Container ID="Container12" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".48">
                                                                                    <Items>
                                                                                        <ext:TextField ID="tfImePriimek1" runat="server" DataIndex="imeinpriimek" FieldLabel="Ime in priimek"
                                                                                            ReadOnly="true" AnchorHorizontal="95%" />
                                                                                    </Items>
                                                                                </ext:Container>
                                                                                <ext:Container ID="Container16" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".3">
                                                                                    <Items>
                                                                                        <ext:TextField ID="tfTelefon1" runat="server" DataIndex="telefon" FieldLabel="Telefon"
                                                                                            ReadOnly="true" AnchorHorizontal="95%" />
                                                                                    </Items>
                                                                                </ext:Container>
                                                                                <ext:Container ID="Container17" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".01">
                                                                                    <Items>
                                                                                        <sio:Button ID="btnStars1" runat="server" Icon="emailedit" FieldLabel="Uredi" AnchorHorizontal="50%">
                                                                                        </sio:Button>
                                                                                    </Items>
                                                                                </ext:Container>
                                                                            </Items>
                                                                        </ext:Container>
                                                                    </Items>
                                                                </ext:Panel>
                                                            </Items>
                                                        </ext:FieldSet>
                                                    </Items>
                                                </ext:Panel>
                                            </ext:LayoutColumn>
                                            <ext:LayoutColumn ColumnWidth=".5">
                                                <ext:Panel ID="Panel10" runat="server" Border="false" Width="325">
                                                    <Items>
                                                        <ext:FieldSet ID="Fieldset2" runat="server" Title="Starš 2" Layout="form" Width="300">
                                                            <Items>
                                                                <ext:Panel ID="Panel4" runat="server" Width="300" Border="false" ButtonAlign="Center">
                                                                    <Items>
                                                                        <ext:Container ID="Container13" runat="server" Layout="Column" Height="45">
                                                                            <Items>
                                                                                <ext:Container ID="Container14" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".48">
                                                                                    <Items>
                                                                                        <ext:TextField ID="tfImePriimek2" DataIndex="imeinpriimek" runat="server" FieldLabel="Ime in priimek"
                                                                                            ReadOnly="true" Enabled="false" AnchorHorizontal="95%" />
                                                                                    </Items>
                                                                                </ext:Container>
                                                                                <ext:Container ID="Container15" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".3">
                                                                                    <Items>
                                                                                        <ext:TextField ID="tfTelefon2" DataIndex="telefon" runat="server" FieldLabel="Telefon"
                                                                                            ReadOnly="true" AnchorHorizontal="95%" />
                                                                                    </Items>
                                                                                </ext:Container>
                                                                                <ext:Container ID="Container18" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".01">
                                                                                    <Items>
                                                                                        <sio:Button ID="btnStars2" runat="server" Icon="emailedit" FieldLabel="Uredi" AnchorHorizontal="50%">
                                                                                        </sio:Button>
                                                                                    </Items>
                                                                                </ext:Container>
                                                                            </Items>
                                                                        </ext:Container>
                                                                    </Items>
                                                                </ext:Panel>
                                                            </Items>
                                                        </ext:FieldSet>
                                                    </Items>
                                                </ext:Panel>
                                            </ext:LayoutColumn>
                                        </Columns>
                                    </ext:ColumnLayout>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:FormPanel>
                    <ext:Panel ID="PanelStatus" runat="server" Border="false" LabelAlign="Top" Layout="form"
                        Split="true">
                        <Items>
                            <sio:TabPanel runat="server" ID="TabVlogaPodrobnosti">
                                <Items>
                                    <sio:GridPanel ID="VlogaStatusGrid" runat="server" Height="150" Title="Statusi">
                                        <Store>
                                            <ext:Store ID="StoreStatusiSeznam" runat="server">
                                                <Reader>
                                                    <ext:JsonReader IDProperty="VlogaID">
                                                        <Fields>
                                                            <ext:RecordField Name="VlogaId" Type="Int" />
                                                            <ext:RecordField Name="LetoId" Type="int" />
                                                            <ext:RecordField Name="Oznaka" Type="string" />
                                                            <ext:RecordField Name="Status" Type="string" />
                                                        </Fields>
                                                    </ext:JsonReader>
                                                </Reader>
                                            </ext:Store>
                                        </Store>
                                        <ColumnModel ID="ColumnModel1" runat="server">
                                            <Columns>
                                                <ext:RowNumbererColumn />
                                                <ext:Column ColumnID="VlogaId" Hidden="true" Hideable="false" DataIndex="VlogaId">
                                                </ext:Column>
                                                <ext:Column Header="Šolsko Leto" DataIndex="LetoId">
                                                </ext:Column>
                                                <ext:Column Header="Razred" DataIndex="Oznaka">
                                                </ext:Column>
                                                <ext:Column Header="Status" DataIndex="Status">
                                                </ext:Column>
                                            </Columns>
                                        </ColumnModel>
                                    </sio:GridPanel>
                                </Items>
                            </sio:TabPanel>
                            <ext:Panel ID="Panel5" runat="server" Border="false" Height="50" BodyStyle="background-color: #CCE7CE; border-bottom: 1px solid #d0d0d0; ">
                                <Items>
                                    <ext:Panel ID="Panel6" runat="server" Border="false" ButtonAlign="Left">
                                        <Buttons>
                                            <sio:Button ID="btnShrani" runat="server" Text="Shrani" Icon="Accept">
                                                <Listeners>
                                                    <%--<Click Handler="if (#{FormPanelPodrobnosti}.getForm().isValid()) {Ext.net.DirectMethods.ShraniUceciPodrobnosti(#{IDM}.getValue());}else{Ext.Msg.show({icon: Ext.MessageBox.ERROR, msg: 'Prosimo vnesite zahtevana polja.', buttons:Ext.Msg.OK});}" />--%>
                                                </Listeners>
                                            </sio:Button>
                                            <sio:Button ID="btnPreklici" runat="server" Text="Prekliči" Icon="Decline">
                                                <%-- <Listeners><Click Handler="Ext.net.DirectMethods.ShraniUceciPodrobnosti();" /></Listeners>--%>
                                            </sio:Button>
                                        </Buttons>
                                    </ext:Panel>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:Panel>
                </Items>
            </sio:ScrollingPanel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
